/**
 * @Author: hl
 * @Date: 2019/8/15
 * @Last Modified by:
 * @Last Modified time:
 */

import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 搜索
export const searchGiveCar = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/GiveCar/query`, {
  params
});
// 交车
export const alterTraceTime = (roNo, traceTime, params) => axios.put(`${SERVER.DMSCLOUD_REPAIR}/GiveCar/alterTraceTime/${roNo}/${traceTime}`, {
  params
});
// 取消交车
export const cancel = (roNo, params) => axios.put(`${SERVER.DMSCLOUD_REPAIR}/GiveCar/getVehicle/${roNo}`, {
  params
});
// 服务顾问 - 下拉框
export const getUserListSelect = params => axios.get(`/api/sysManage/basedata/users/getUserListByRole?role=10071011`, {
  params
});
// 查询所有员工
export const getAllUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);

// 导出
export const giveCarInfoExport = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/GiveCar/GiveCarInfoExport`, {
  params,
  responseType: 'arraybuffer'
});
